program test1
    implicit none
    ! integer, parameter :: i = 2
    ! integer, parameter :: k = 2
    ! integer :: j = i+k

    ! type cell
    ! integer :: i
    ! real :: k
    ! end type cell

    ! type(cell) :: c 
    ! c%i = 3
    ! write(*,*) j
    ! write(*,*) c%i 
    ! write(*,*) c%i**4 * 2

    integer, parameter :: mxdim = 4
    integer :: k
    real :: dum(mxdim), d = 1.0D3
    do k = 1, mxdim
        dum(k) = k
    end do 
    write(*,*) d 
    ! reshape(dum, )
    ! namelist /mylist/ dum
    ! character(12) :: ch 
    ! integer :: i, j, k 
    ! target ::  k 
    ! integer, pointer :: p 
    ! write(*,'(3I5)') (((i, j, k, i = 1, 2), j = 10, 20, 10), k = 100, 200, 100)
    ! write(*,*)
    ! p => k 
    ! write(*,*) p 
    ! dum(1) = 1.0; dum(2) = 2.0; dum(3) = 3.0
    ! read(*,"(A)") ch 
    ! write(*,"(A)") ch 
    ! write(*,)
    ! do k = 1, 
    ! real :: m(2), n(4), c, d 
    ! namelist /tes/ c, d 
    ! open(unit=3, file='output', action='write', status='old', form='formatted')
    ! open(unit=3, file='input', action='read', status='old', form='formatted')
    !  read(3,nml=tes)
    ! m(1) = 1; m(2) = 2
    ! n(2) = 3
    ! m(1:2) = n(2)
    ! c = 5.0
    !  write(3,nml=mylist) 
    ! call te(dum)
    ! open(unit=3, file='output', action='write', status='old', form='formatted')
    ! write(3,*) dum

    ! write(*,*) 4.0*atan(1.0)
    ! call print_matrix(dum)
end program test1 

subroutine te(dum)
    implicit none
    real, dimension(0:20,4) :: dum
    integer :: i, k 

    do i = 1, 4
        do k = 0, 20
            dum(k,i) = i*k
        end do
    end do 
end subroutine te 

    subroutine print_matrix(A)
        integer, parameter :: dbl = 8
        real(dbl), dimension(:,:), intent(in) :: A
        integer :: row, k
        row = size(A,1)
        do k = 1, row
           write(*,*) A(k,:)
        end do
        write(*,*)
      end subroutine print_matrix
      